package net.caidingke.shepherd.domain.user;

import io.ebean.annotation.Cache;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.caidingke.shepherd.domain.BaseModel;
import net.caidingke.shepherd.domain.user.finder.RoleFinder;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @author bowen.
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@Cache
public class Role extends BaseModel {

    public static final String ADMIN = "admin";

    public static final RoleFinder F = new RoleFinder();

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String name;

    private String displayName;

}
